<?php
namespace app\index\controller;
use app\index\model\User;

class test 
{
	  public function hello()
	{
	    return 'hello,world!';
	}
	
	  public function test()
	{
	   $request = request();
	   if($request->isGet()){
		   echo '请求方法：' . $request->method() . '<br/>';
	   }else if($request->isPost()){
		   echo '请求方法：' . $request->method() . '<br/>';
	   }
	   
		$user = new User;
		$user->name= 'thinkphp';
		$user->save();
		echo $user;
	}
}